import java.util.*;

/**
 * @author LKQ
 * @date 2022/5/5 15:05
 * @description
 */
public class Solution {
    public static void main(String[] args) {

    }
    public List<String> simplifiedFractions(int n) {
        List<String> ans = new ArrayList<>();
        if (n == 1) {
            return ans;
        }
        for (int i = 2; i <= n; i++) {
            for (int j = 1; j < i; j++) {
                // 分子分母的最大公约数为1，那么说明为最简分数
                if (gcd(i, j) == 1) {
                    ans.add(j + "/" + i);
                }
            }
        }
        return ans;
    }
    public int gcd(int a, int b) {
        return b != 0 ? gcd(b, a % b) : a;
    }
}
